import fs from 'fs-extra';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const srcDir = path.resolve(__dirname, '../node_modules/tinymce');
const destDir = path.resolve(__dirname, '../public/tinymce');

// 确保目标目录存在
fs.ensureDirSync(destDir);

// 复制文件
fs.copySync(srcDir, destDir, { overwrite: true });

console.log('TinyMCE资源文件已成功复制到public/tinymce目录！');
